<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/3/20
 * Time: 17:25
 */


use yii\grid\GridView;
use yii\helpers\Html;
use common\components\widgets\Datetimepicker;
use doumiaoduo\layer\LayerConfirmWidget;
use doumiaoduo\layer\LayerIframeWidget;

LayerConfirmWidget::widget();
LayerIframeWidget::widget();
Datetimepicker::widget(['flag' => 'timepicker']);
?>
<div class="yx-praise-list-box yx-praise-box yx-radius2">
    <div class="docs-main zx-mg">
        <?= GridView::widget([
            'dataProvider' => $dataProvider,
            'captionOptions' => ['style' => 'font-size: 16px; font-weight: bold; color: #000; text-align: center;'],
            'tableOptions' => ['class' => 'tablesaw table yx-table1 yx-table3 table-striped with-check'],
            'columns' => [
                [
                    'attribute' => 'id',
                    'value' => 'id',
                    'label' => '序号'
                ],
                [
                    'attribute' => 'goods_name',
                    'value' => 'goods_name',
                    'label' => '课程名称'
                ],
                [
                    'attribute' => 'teacher_name',
                    'value' => 'teacher_name',
                    'label' => '老师姓名'
                ],
                [
                    'attribute' => 'customer_name',
                    'value' => 'customer_name',
                    'label' => '家长姓名'
                ],
                [
                    'attribute' => 'student_name',
                    'value' => 'student_name',
                    'label' => '学生姓名'
                ],
                [
                    'attribute' => 'lesson',
                    'value' => 'lesson',
                    'label' => '课次'
                ],
                [
                    'attribute' => 'class_time',
                    'value' => 'class_time',
                    'label' => '上课日期'
                ],
                [
                    'attribute' => 'class_type',
                    'value' => 'class_type',
                    'label' => '课次类型'
                ],
                [
                    'attribute' => 'subsidy',
                    'value' => 'subsidy',
                    'label' => '补贴'
                ],
                [
                    'attribute' => 'proportions',
                    'value' => 'proportions',
                    'label' => '分成'
                ],
                [
                    'attribute' => 'check_type',
                    'value' => 'check_type',
                    'label' => '打卡类型'
                ],
                [
                    'attribute' => 'check_user',
                    'value' => 'check_user',
                    'label' => '打卡人'
                ],
                [
                    'attribute' => 'created_at',
                    'value' => 'created_at',
                    'label' => '添加时间'
                ],
            ],
            'emptyText'=>'',
            'emptyTextOptions'=>['style'=>'background: url(/images/no_content.png) no-repeat center center;width:100%;height:500px;'],
            'layout' => "{items}\n<div style='text-align: right'>{pager}</div>",
            'showOnEmpty' => false,
            'options' => ['class' => 'tablesaw'],
            'headerRowOptions' => ['class' => 'yx-bgd2f6ec'],
            'footerRowOptions' => ['class' => 'yx-floatl yx-color73bbef yx-font13 yx-lh24'],
            'pager' => [
                'class' => \common\components\widgets\GoPager::className(),
            ]
        ]); ?>
    </div>
</div>